<extend name="Index/base2" />
<block name="main">
    <div class="book-cate">
        <div class="book-search hide">
            <input type="text" placeholder="Type to search" class="book-input-search" />
        </div>
        <div class="book-summary-title">
            <a href="{:U('tell/book/show/b/'.$book['id'])}" class="book-name">Return - {$book.name}</a>
        </div>
        <div class="cateContainer">
            <li><a href="{:U('tell/book/history/b/'.$book['id'])}" cid="0"> 写在前面</a></li>
        </div>
    </div>
    <div class="book-container with-cate">
        <div class="book-body">
            <div class="book-header clearfix">
                <a href="javascript:void(0);" class="left cate-onOff"><span class="icon-sum"></span></a>
                <a href="javascript:void(0);" class="left search-onOff"><span class="icon-search"></span></a>
                <a href="javascript:void(0);" class="left"><span class="icon-a"></span></a>
                <a href="javascript:void(0);" class="show-ad left"></a>
                <a href="javascript:void(0);" class="right hide"><span class="icon-share"></span></a>
                <a href="javascript:void(0);" class="right shareQQ" title="分享到QQ空间" target="_blank"><span class="icon-qq"></span></a>
                <a href="javascript:void(0);" class="right shareWeibo" title="分享到微博" target="_blank"><span class="icon-weibo"></span></a>
                <a href="javascript:void(0);" class="right shareWeixin" title="分享到微信" target="_blank"><span class="icon-weixin"></span></a>
            </div>
            <div class="book-main clearfix">
            <div class="faqs">
                <div class="faq-title-msg">
                    <p>当前，文档<a href="{:U('tell/book/book/b/'.$book['id'])}"><strong>「 {$book.name} 」</strong></a>的所有历史版本！</p>
                </div>
                <ul class="faq-nav clearfix">
                    <li class="active"><a href="{:U('tell/book/history/b/'.$book['id'])}">All.</a></li>
                    <!-- <li><a href="{:U('/tell/nq/'.$book['id'])}">未审核</a></li> -->
                </ul>
                <ul class="faq-container history-list">
                    <if condition="$list">
                        <volist name="list" id="vo">
                            <li class="faq-div">
                                <a href="" class="faq-count"><span>·</span></a>
                                <div class="faq-content">
                                    <h2 class="faq-title"><a href="{:U('tell/book/show/b/'.$book['id'].'/c/'.$vo['cid'].'/h/'.$i)}">{$vo.desc}</a></h2>
                                    <p><a href="{:U('tell/user/show/u/'.$vo['author'])}">{$vo.nick}</a>&nbsp;&nbsp;<span class="icon-time"></span> {$vo.create|date="Y-m-d",###}</p>
                                </div>
                            </li>
                        </volist>
                    <else/>
                        暂无历史版本！
                    </if>
                    <gt name="count" value="20">{$page}</gt>
                </ul>
                <!-- <h1 class="history-title">写在前面&nbsp;&nbsp;&nbsp;<span>历史版本</span></h1>
                <ul class="faq-container history-list">
                    <volist name="list" id="vo">
                        <li class="faq-div">
                            <a href="" class="faq-count"><span>·</span></a>
                            <div class="faq-content">
                                <h2 class="faq-title"><a href="{:U('/tell/s/'.$book['id'].'/'.$vo['cid'].'/'.$i)}">{$vo.desc}</a></h2>
                                <p><a href="{:U('/tell/u/'.$vo['author'])}">{$vo.nick}</a>&nbsp;&nbsp;<span class="icon-time"></span> {$vo.create|date="Y-m-d",###}</p>
                            </div>
                        </li>
                    </volist>
                </ul> -->
            </div>
            </div>
        </div>
    </div>
</block>
<block name="js">
    <script>
        $(document).ready(function(){
            var cate={$cate.content|default="[]"},cid="{$cid|default=-1}";
            $('.cateContainer').append(getHCate(cate,"{$book.id}"));
            if(cid>0){
                var obj=$(".cateContainer a[cid="+cid+"]");
                obj.addClass('act');
                //$('.article-title').text(obj.text());
            }else{
                $(".cateContainer a[cid=0]").addClass('act');
            }
            if($('.cateContainer>ul>li').length) setCount('.cateContainer>ul>li');
            if($('.article-title').length){
                var shareUrl='http://www.jiathis.com/send/?webid=';
                var shareStr='';
                if({$article.cid|default=-1}>0){
                    shareStr+='&url=http://www.inets.wang/tell/book/show/b/{$book.id}/d/{$article.cid}.html&title=我网(i tell u.) - '+$("a[cid="+cid+"]").text()+':我网，做互联网沙滩上的拾贝者！！！';
                }else{
                    shareStr+='&url=http://www.inets.wang/tell/book/show/b/{$book.id}/d/{$article.cid}.html&title=我网(i tell u.) - 写在前面:我网，做互联网沙滩上的拾贝者！！！';
                }
                $('.shareQQ').attr('href',shareUrl+'qzone'+shareStr);
                $('.shareWeibo').attr('href',shareUrl+'tsina'+shareStr);
                $('.shareWeixin').attr('href',shareUrl+'weixin'+shareStr);
            }
            $('.cate-onOff').click(function(){
                if($('.book-cate').hasClass('hide')){
                    $('.book-cate').removeClass('hide');
                    $('.book-container').addClass('with-cate');
                }else{
                    $('.book-cate').addClass('hide');
                    $('.book-container').removeClass('with-cate');
                }
            });
        });
    </script>
</block>